﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using BaseEntities;
using DataAccess;

namespace BussinessLogic
{
    public class LogBLL
    {
        DataAccess.DataAccess DB = new DataAccess.DataAccess();
        public void WriteLog(Log log)
        {
            string query = "EXEC [WriteLog] @LogTypeID, @ATMID, @CardNo, @LogDate, @Amount, @Detail";
            SqlParameter paramLogTypeID = new SqlParameter("@LogTypeID", log.LogTypeID);
            SqlParameter paramATMID = new SqlParameter("@ATMID", log.ATMID);
            SqlParameter paramCardNo = new SqlParameter("@CardNo", log.CardNo);
            SqlParameter paramLogDate = new SqlParameter("@LogDate", log.LogDate);
            SqlParameter paramAmount = new SqlParameter("@Amount", log.Amount);
            SqlParameter paramDetail = new SqlParameter("@Detail", log.Details);
            DB.UpdateData(query, paramLogTypeID, paramATMID, paramCardNo, paramLogDate, paramAmount, paramDetail);
        }
    }
}
